    <div class="refentry" id="glGetQueryObjectuiv">
      <div class="titlepage"></div>
      <div class="refnamediv">
        <h2>Name</h2>
        <p>glGetQueryObjectuiv — return parameters of a query object</p>
      </div>
      <div class="refsynopsisdiv">
        <h2>C Specification</h2>
        <div class="funcsynopsis">
          <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table">
            <tr>
              <td>
                <code class="funcdef">void <strong class="fsfunc">glGetQueryObjectuiv</strong>(</code>
              </td>
              <td>GLuint <var class="pdparam">id</var>, </td>
            </tr>
            <tr>
              <td> </td>
              <td>GLenum <var class="pdparam">pname</var>, </td>
            </tr>
            <tr>
              <td> </td>
              <td>GLuint * <var class="pdparam">params</var><code>)</code>;</td>
            </tr>
          </table>
          <div class="funcprototype-spacer"> </div>
        </div>
      </div>
      <div class="refsect1" id="parameters">
        <h2>Parameters</h2>
        <div class="variablelist">
          <dl class="variablelist">
            <dt>
              <span class="term">
                <em class="parameter">
                  <code>id</code>
                </em>
              </span>
            </dt>
            <dd>
              <p>
                    Specifies the name of a query object.
                </p>
            </dd>
            <dt>
              <span class="term">
                <em class="parameter">
                  <code>pname</code>
                </em>
              </span>
            </dt>
            <dd>
              <p>
                    Specifies the symbolic name of a query object parameter.
                    Accepted values are <code class="constant">GL_QUERY_RESULT</code> or <code class="constant">GL_QUERY_RESULT_AVAILABLE</code>.
                </p>
            </dd>
            <dt>
              <span class="term">
                <em class="parameter">
                  <code>params</code>
                </em>
              </span>
            </dt>
            <dd>
              <p>
                    Returns the requested data.
                </p>
            </dd>
          </dl>
        </div>
      </div>
      <div class="refsect1" id="description">
        <h2>Description</h2>
        <p>
            <code class="function">glGetQueryObjectuiv</code> returns in <em class="parameter"><code>params</code></em> a selected parameter of the query object
            specified by <em class="parameter"><code>id</code></em>.
        </p>
        <p>
            <em class="parameter"><code>pname</code></em> names a specific query object parameter.  <em class="parameter"><code>pname</code></em> can be as follows:
        </p>
        <div class="variablelist">
          <dl class="variablelist">
            <dt>
              <span class="term">
                <code class="constant">GL_QUERY_RESULT</code>
              </span>
            </dt>
            <dd>
              <p>
                        <em class="parameter"><code>params</code></em> returns the value of the query object's passed samples counter.
                        The initial value is 0.
                    </p>
            </dd>
            <dt>
              <span class="term">
                <code class="constant">GL_QUERY_RESULT_AVAILABLE</code>
              </span>
            </dt>
            <dd>
              <p>
                        <em class="parameter"><code>params</code></em> returns whether the passed samples counter is immediately available.
                        If a delay would occur waiting for the query result, <code class="constant">GL_FALSE</code> is returned.
                        Otherwise, <code class="constant">GL_TRUE</code> is returned, which also indicates that the results of all
                        previous queries of the same type are available as well.
                    </p>
            </dd>
          </dl>
        </div>
      </div>
      <div class="refsect1" id="notes">
        <h2>Notes</h2>
        <p>
            If an error is generated,
            no change is made to the contents of <em class="parameter"><code>params</code></em>.
        </p>
        <p>
            When <em class="parameter"><code>pname</code></em> is <code class="constant">GL_QUERY_RESULT</code>, <code class="function">glGetQueryObjectuiv</code>
			implicitly flushes the GL pipeline so that any incomplete rendering delimited by the occlusion query completes in finite time.
        </p>
        <p>
                        Repeatedly querying the <code class="constant">GL_QUERY_RESULT_AVAILABLE</code> state for any given query object is
                        guaranteed to return true eventually. Note that multiple queries to the same occlusion object may result in a
                        significant performance loss. For better performance it is recommended to wait N frames before querying this
                        state. N is implementation-dependent but is generally between one and three.
        </p>
        <p>
            If multiple queries are issued using the same query object <em class="parameter"><code>id</code></em> before calling
            <code class="function">glGetQueryObjectuiv</code>, the results of the most recent query will be returned.  In this case,
            when issuing a new query, the results of the previous query are discarded.
        </p>
      </div>
      <div class="refsect1" id="errors">
        <h2>Errors</h2>
        <p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>pname</code></em> is not an accepted value.
        </p>
        <p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>id</code></em> is not the name of a query object.
        </p>
        <p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>id</code></em> is the name of a currently active
            query object.
        </p>
      </div>
      {$pipelinestall}{$examples}
      <div class="refsect1" id="versions">
        <h2>API Version Support</h2>
        <div class="informaltable">
          <table style="border-collapse: collapse; border-top: 2px solid ; border-bottom: 2px solid ; border-left: 2px solid ; border-right: 2px solid ; ">
            <colgroup>
              <col style="text-align: left; "/>
              <col style="text-align: center; " class="firstvers"/>
              <col style="text-align: center; "/>
              <col style="text-align: center; " class="lastvers"/>
            </colgroup>
            <thead>
              <tr>
                <th style="text-align: left; border-right: 2px solid ; ">

            </th>
                <th style="text-align: center; border-bottom: 2px solid ; " colspan="3">
                <span class="bold"><strong>OpenGL ES API Version</strong></span>
            </th>
              </tr>
              <tr>
                <th style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                <span class="bold"><strong>Function Name</strong></span>
            </th>
                <th style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                <span class="bold"><strong>2.0</strong></span>
            </th>
                <th style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                <span class="bold"><strong>3.0</strong></span>
            </th>
                <th style="text-align: center; border-bottom: 2px solid ; ">
                <span class="bold"><strong>3.1</strong></span>
            </th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; ">glGetQueryObjectuiv</td>
                <td style="text-align: center; border-right: 2px solid ; ">-</td>
                <td style="text-align: center; border-right: 2px solid ; ">✔</td>
                <td style="text-align: center; ">✔</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div class="refsect1" id="seealso">
        <h2>See Also</h2>
        <p>
            <a class="citerefentry" href="glBeginQuery"><span class="citerefentry"><span class="refentrytitle">glBeginQuery</span></span></a>,
            <a class="citerefentry" href="glEndQuery"><span class="citerefentry"><span class="refentrytitle">glEndQuery</span></span></a>,
            <a class="citerefentry" href="glGetQueryiv"><span class="citerefentry"><span class="refentrytitle">glGetQueryiv</span></span></a>,
            <a class="citerefentry" href="glIsQuery"><span class="citerefentry"><span class="refentrytitle">glIsQuery</span></span></a>,
        </p>
      </div>
      <div class="refsect1" id="Copyright">
        <h2>Copyright</h2>
        <p>
            Copyright © 2005 Addison-Wesley.
            Copyright © 2010-2014 Khronos Group.
            This material may be distributed subject to the terms and conditions set forth in
            the Open Publication License, v 1.0, 8 June 1999.
            <a class="link" href="https://opencontent.org/openpub/" target="_top">https://opencontent.org/openpub/</a>.
        </p>
      </div>
    </div>
